package com.applications.codemash.core;

public final class Constants
{
	public static final String DOMAIN = "http://www.codemash.org";
	public static final String SPEAKER_REST = "/rest/speakers";
	public static final String SESSION_REST = "/rest/sessions";
	
	public static String GetAllSpeakersUri()
	{
		return DOMAIN + SPEAKER_REST;
	}
	
	public static String GetAllSessionsUri()
	{
		return DOMAIN + SESSION_REST;
	}
	
	public static String GetFullUri(String uri)
	{
		if (!uri.startsWith(DOMAIN))
		{
			uri = DOMAIN + uri;
		}
		
		return uri;
	}
	
	public static String GetTwitterShowUrlString(String twitterHandle)
	{
		String url = "http://twitter.com/users/show/" + twitterHandle + ".xml";
		return url;
	}
	
	/* definitions of element names from expected XML in Sessions */
	public static final String SESSIONS_ROOT_ELEMENT = "Sessions";
	public static final String SESSION_ELEMENT_NAME = "Session";
	public static final String URI_ELEMENT_NAME = "URI";
	public static final String TITLE_ELEMENT_NAME = "Title";
	public static final String ABSTRACT_ELEMENT_NAME = "Abstract";
	public static final String START_ELEMENT_NAME = "Start";
	public static final String DIFFICULTY_ELEMENT_NAME = "Difficulty";
	public static final String TECHNOLOGY_ELEMENT_NAME = "Technology";
	public static final String SPEAKER_NAME_ELEMENT_NAME = "SpeakerName";
	public static final String SPEAKER_URI_ELEMENT_NAME = "SpeakerURI";
	public static final String TRACK_ELEMENT_NAME = "Track";
	public static final String ROOM_ELEMENT_NAME = "Room";
	
	/* definitions of element names from expected XML in Speakers */
	public static final String SPEAKERS_ROOT_ELEMENT = "Speakers";
	public static final String SPEAKER_ELEMENT_NAME = "Speaker";
	public static final String NAME_ELEMENT_NAME = "Name";
	public static final String BIOGRAPHY_ELEMENT_NAME = "Biography";
	public static final String SESSIONS_ELEMENT_NAME = "Sessions";
	public static final String SESSION_URI_INNER_ELEMENT_NAME = "SessionURI";
	public static final String TWITTER_ELEMENT_NAME = "TwitterHandle";
	public static final String BLOG_URL_ELEMENT_NAME = "BlogURL";
	
	/* definitions of element names from XML in Twitter lookup */
	public static final String TWITTER_USER_ELEMENT = "user";
	public static final String TWITTER_USER_PROFILE_IMAGE_ELEMENT = "profile_image_url";
	
	/* constant values used within the application */
	public static final String SESSION_INTENT_KEY = "Session";
	public static final String SPEAKER_INTENT_KEY = "Speaker";
	public static final String SESSION_TRACK_INTENT_KEY = "SessionTrack";
}
